This appears to be scanning for interference on adjoining channels
If we're not a G PHY with PHY revision > 0, return false
Lock PHYRegisterLock
Lock RadioRegisterLock
Mask PHYRegister 0x802 with 0xFFFC
Mask PHYRegister 0x429 with mask 0x7FFF
Set All Gains to 3, 8, 1
- Loop over the channels 5 less than the current up to 5 more than the current (Clamped between 1 and 13)
- If the channel currently being checked is not within 2 channels of the currently selected channel
Note the return value of ACI Detect RSSI Power for this channel (true/false)
- If the channel currently being checked is not within 2 channels of the currently selected channel
- Set the channel to the current channel
MaskSet PHYRegister 0x802 with mask 0xFFFC and set with 0x3
Mask PHYRegister 0x403 with mask 0xFFF8
Set PHYRegister 0x429 bit 0x8000
Set OriginalGains
- Loop over all of the channels
If the return value of ACI Detect RSSI Power for this channel was true
- Set the next four channels to true also
Unlock RadioRegisterLock
Unlock PHYRegisterLock
- Return the true/false value for the currently selected channel